# -*- mode: python ; coding: utf-8 -*-
import os
block_cipher = None

# 获取当前目录
current_dir = os.path.dirname(os.path.abspath(SPEC))
resources_dir = os.path.join(current_dir, 'resources')

a = Analysis(
    ['rest_reminder.py'],
    pathex=[current_dir],
    binaries=[],
    datas=[
        (os.path.join(resources_dir, 'clock.ico'), 'resources'),
        (os.path.join(resources_dir, 'icon.ico'), 'resources'),
        (os.path.join(resources_dir, 'icon.png'), 'resources'),
        (os.path.join(resources_dir, 'reminder.wav'), 'resources'),
        (os.path.join(resources_dir, 'rest_suggestions.json'), 'resources'),  # 添加休息建议配置文件
    ],
    hiddenimports=[
        'pkg_resources',
        'matplotlib.backends.backend_tkagg',
        'PIL._tkinter_finder'
    ],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='智能休息提醒器',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon=os.path.join(resources_dir, 'clock.ico'),
    version='file_version_info.txt'
)